//
//  XFCameraView.m
//  FreeTime
//
//  Created by 王江华 on 16/8/26.
//  Copyright © 2016年 SRDZ.com. All rights reserved.
//

#import "XFCameraView.h"
#import "Header.h"


@interface XFCameraView()


@property(nonatomic,strong)UIImageView *cameraView,*starView;
@property(nonatomic,strong)UILabel *photoLabel,*starLabel;


@end















@implementation XFCameraView

- (instancetype)init
{
    self = [super init];
    if (self) {
        if (!_cameraView) {
            _cameraView = [[UIImageView alloc] init];
            [self addSubview:_cameraView];
        }
        if (!_photoLabel) {
            _photoLabel = [[UILabel alloc] init];
            _photoLabel.font = [UIFont systemFontOfSize:13.0f];
            [self addSubview:_photoLabel];
        }
    }
    return self;
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    
    _cameraView.frame = CGRectMake(self.frame.size.width - 45, 0, 20, 20);
    _cameraView.image = [UIImage imageNamed:@"pic"];
    
    _photoLabel.frame = CGRectMake(self.frame.size.width - 20, 0, 10, 20);
    _photoLabel.textAlignment = NSTextAlignmentRight;
    _photoLabel.text = _photos;
    _photoLabel.textColor = TEXTCOLOR;
    
}

-(void)dealloc
{
   
}



@end
